/**
@author		Jong Min, Lee
@date		  02/06/2014
@brief		tool button class

copyright(c) Tae Young Soft. All right reserved. 2014
*/
#include "stdafx.h"
#include "Taurus_Viewer/ToolButton.h"

#include "Taurus_ToolData/ToolboxData.h"

CToolButton::CToolButton()
  : m_pAttachedToolData(NULL)
{}

CToolButton::~CToolButton()
{}

DWORD CToolButton::attachToolData(const CToolData* pToolData)
{
  if(pToolData == NULL)
    return ERROR_INVALID_PARAMETER;

  m_pAttachedToolData = pToolData;
  return ERROR_SUCCESS;
}

const CToolData* CToolButton::detachToolData()
{
  //save attached tool data temporarily 
  const CToolData* pTemp = m_pAttachedToolData;
  m_pAttachedToolData = NULL;
  return pTemp;
}

BEGIN_MESSAGE_MAP(CToolButton, CEXButton)
END_MESSAGE_MAP()